package models

// 积分信息

type SysScore struct {
	Model
	ModelTime
	BuyerId      int     `gorm:"type:int(10);not null;default:0;index;comment:买家id" json:"buyer_id"`
	OrderNumber  string  `gorm:"type:varchar(64);not null;default:'';index;comment:订单编号" json:"order_number"`
	ScoreChange  float64 `gorm:"type:decimal(10,2);comment:积分变动" json:"score_change"`
	Change       int     `gorm:"type:int(10);not null;default:1;index;comment:1积分收入或者支出" json:"change"`
	ScoreSum     float64 `gorm:"type:decimal(10,2);comment:本次变动后的积分总额" json:"score_sum"`
	OrderType    string  `gorm:"type:varchar(64);comment:商品类型OnlineOrder，MaterialOrder,LiveOrder" json:"order_type"`
	Subject      string  `gorm:"type:varchar(64);comment:科目" json:"subject"`
	Name         string  `gorm:"type:varchar(64);comment:课程名称" json:"name"`
	Cover        string  `gorm:"type:varchar(500);comment:封面" json:"cover"`
	Introduction string  `gorm:"type:varchar(500);comment:课程简介" json:"introduction"`
	ControlBy
}

func (on SysScore) TableName() string {
	return "sys_score"
}
